//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Copyright 2012 Microsoft Corporation. All Rights Reserved
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.   
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

namespace Preflight
{
    using Model;

    /// <summary>
    /// Single Verification
    /// </summary>
    public interface IVerification
    {
        /// <summary>
        /// Gets name of this verification
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets category of this verification: i.e. Database, Services etc...
        /// </summary>
        string Category { get; }

        /// <summary>
        /// Runs verification and returns the results
        /// </summary>
        /// <remarks>
        /// It's important to remember that a verification should follow these rules:
        /// 1- Do not maintain state (other than static configuration). The same instance should be re-runnable
        /// 2- Your verification should catch all exceptions and report errors through the result object
        /// 3- You should include information messages describing what you have verified (i.e. server name)
        /// 4- You should avoid different verifications having shared resources
        /// 5- Verifications order of execution is not guaranteed.
        /// </remarks>
        /// <returns>VerificationResult</returns>
        VerificationResult Run();
    }
}